package libregnummap;

import java.awt.Color;
import java.awt.Font;
/*
 * Text.java
 *
 * Created on March 4, 2009, 5:54 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

/**
 *
 * @author alvaro
 */
public class Text extends PrintableObject {
    
    private int x, y;
    private float alpha;
    private String text;
    private Font font = null;
    
    /** Creates a new instance of Text */
    Text(int x, int y, int size, Color c, float alpha, String text, String type) {
        this.x = x;
        this.y = y;
        this.font = Font.decode("PLAIN "+Integer.toString(size));
        this.alpha = alpha;
        this.text = text;
        
        setColor(c);
        setType(type);
    }

    public float getAlpha() {
        return alpha;
    }

    public Font getFont() {
        return font;
    }

    public String getText() {
        return text;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public void setAlpha(float alpha) {
        this.alpha = alpha;
    }

    public void setFont(Font font) {
        this.font = font;
    }

    public void setText(String text) {
        this.text = text;
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }
    
    Text(int x, int y, Font font, Color c, float alpha, String text, String type) {
        this.x = x;
        this.y = y;
        this.font = font;
        this.alpha = alpha;
        this.text = text;
        
        setColor(c);
        setType(type);
    }
}
